<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>纯css绘制三角形</title>
		<style>
			.trigangle1{
				width:0;
				height: 0;
				border-width: 20px;
				border-style: solid;
				border-color: green greenyellow blue pink;
			}
			.trigangle2{
				width:0;
				height: 0;
				border-width: 20px;
				border-style: solid;
				border-color: green transparent transparent transparent;
			}
			.trigangle3{
				width:0;
				height: 0;
				border-style: solid;
				border-color: transparent red transparent transparent;
				border-width: 22px 8px 0 0;
			}
		</style>
	</head>
	<body>
		<div class="trigangle1"></div>
		<div class="trigangle2"></div>
		<div class="trigangle3"></div>
		<div class="trigangle4"></div>
	</body>
</html>